main: src/main.c lib/libcal.a
	gcc -o main src/main.c -Iinclude -Llib -lcal

lib/libcal.a: lib/add.o lib/sub.o
	ar rcs lib/libcal.a lib/add.o lib/sub.o

lib/add.o: src/add.c include/add.h
	gcc -c -o lib/add.o src/add.c -Iinclude

lib/sub.o: src/sub.c include/sub.h
	gcc -c -o lib/sub.o src/sub.c -Iinclude

clean:
	rm -f lib/*.o lib/*.a main

